/*Program to illustrate implicit and explicit type conversion.*/
class type_conv
	{
	public static void main(String[] args)
		{
		//byte to short
		byte b1=(byte)129;
		short bs=b1;
		System.out.println(b1);
		
		//byte to int
		byte b2=60;
		int bi=b2;
		System.out.println(bi);

		//byte to long
		byte b3=70;
		long bl=b3;
		System.out.println(b3);

		//byte to float
		byte b4=60;
		float bf=b4;
		System.out.println(bf);

		//byte to double
		byte b5=80;
		double bd=b5;
		System.out.println(bd);

		//byte to char
		byte b6=65;
		char bc=(char)b6;
		System.out.println(bc);

		//short to byte
		short s1=10;
		byte sb=(byte)s1;
		System.out.println(sb);

		//short to int
		short s2=10;
		int si=s2;
		System.out.println(si);
		
		//short to long
		short s3=30;
		long sl=s3;
		System.out.println(sl);
		
		//short to float
		short s4=40;
		float sf=s4;
		System.out.println(sf);
		
		//short to char
		short s5=70;
		char sc=(char)s5;
		System.out.println(sc);

		//short to double
		short s6=10;
		double sd=s6;
		System.out.println(sd);

		//int to byte
		int i1=2000;
		byte ib=(byte)i1;
		System.out.println(ib);

		//int to short
		int i2=2000;
		short is=(short)i2;
		System.out.println(is);
		
		//int to float
		int i3=20;
		float ifl=i3;
		System.out.println(ifl);

		//int to long
		int i4=200;
		long il=i4;
		System.out.println(il);

		//int to double
		int i5=52;
		double id=i5;
		System.out.println(id);

		//int to char
		int i6=69;
		char ic=(char)i6;
		System.out.println(ic);

		//float to byte
		float f1=400;
		byte fb=(byte)f1;
		System.out.println(fb);
		
		//float to short
		float f2=40;
		short fs=(short)f2;
		System.out.println(fs);

		//float to int
		float f3=80;
		int fi=(int)f3;
		System.out.println(fi);

		//float to long
		float f4=900;
		long fl=(long)f4;
		System.out.println(fl);
		
		//float to char
		float f5=94;
		char fc=(char)f5;
		System.out.println(fc);

		//float to double
		float f6=400;
		double fd=f6;
		System.out.println(fd);

		//long to byte
		long l1=400;
		byte lb=(byte)l1;
		System.out.println(lb);

		//long to short
		long l2=20;
		short ls=(short)l2;
		System.out.println(ls);

		//long to int
		long l3=50;
		int li=(int)l3;
		System.out.println(li);

		//long to float
		long l4=60;
		float lf=(float)l4;
		System.out.println(lf);

		//long to double
		long l5=70;
		double ld=(double)l5;
		System.out.println(ld);

		//long to char
		long l6=100;
		char lc=(char)l6;
		System.out.println(lc);

		//Parsing
		
		//String to int
		String empid="3256";
		int eid=Integer.parseInt(empid);
		System.out.println(eid);

		
		//String to double		
		String epid="3256.9876";
		double ei=Double.parseDouble(epid);
		System.out.println(ei);
		}
}